'use strict';
Object.defineProperties(exports, {
  __esModule: { value: !0 },
  [Symbol.toStringTag]: { value: 'Module' },
});
const i = require('./native.cjs'),
  d = require('./rng.cjs'),
  a = require('./stringify.cjs');
function l(r, u, t) {
  if (i.default.randomUUID && !u && !r) return i.default.randomUUID();
  r = r || {};
  const e = r.random || (r.rng || d.default)();
  if (((e[6] = (e[6] & 15) | 64), (e[8] = (e[8] & 63) | 128), u)) {
    t = t || 0;
    for (let n = 0; n < 16; ++n) u[t + n] = e[n];
    return u;
  }
  return a.unsafeStringify(e);
}
exports.default = l;
